<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

/**
 * @author Anh Nguyen <duyanhnguyen@vccorp.vn>
 * @copyright 2012
 */

class Landing_model extends CI_Model
{

    public function getCategory($parent, $langCode)
    {
        $this->db->select("id, name_$langCode as 'name'");
        $this->db->from('product');
        $this->db->where('parent_id', $parent);
        $r = $this->db->get();
        $return = $r->result_array();
        $r->free_result();
        return $return;
    }
    
    public function getSpecialPro()
    {
        $this->db->select("*");
        $this->db->from('item');
//        $this->db->where('note_id',1);
        $rs = $this->db->get();
        $return = $rs->result_array();
        $rs->free_result();
        return $return;
    }

}

?>
